﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var planyearData = Jxstar.findComboData('planyear');

	var cols = [
	{col:{header:'记录状态', width:100, sortable:true, defaultval:'0', align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'project_mstore__auditing',type:'string'}},
	{col:{header:'提取单位', width:100, sortable:true, defaultval:'fun_getOrgName()', editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TriggerField({
			maxLength:50,
			editable:false,
			triggerClass:'x-form-search-trigger', 
			onTriggerClick: function() {
				var selcfg = {pageType:'combogrid', nodeId:'sys_dept', layoutPage:'/public/layout/layout_tree.js', sourceField:'', targetField:'', whereSql:"", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',fieldName:'project_mstore.dept_name'};
				JxSelect.createSelectWin(selcfg, this, 'node_project_mpull_editgrid');
			}
		})}, field:{name:'project_mstore__dept_name',type:'string'}},
	{col:{header:'投资计划年度', width:100, sortable:true, align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: planyearData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: planyearData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < planyearData.length; i++) {
				if (planyearData[i][0] == value)
					return planyearData[i][1];
			}
		}}, field:{name:'project_mstore__plan_year',type:'string'}},
	{col:{header:'投资总额（万元）', width:132, sortable:true, renderer:JxUtil.formatNumber(2)}, field:{name:'project_mstore__sum_money',type:'float'}},
	{col:{header:'主管部门', width:100, sortable:true, hidden:true}, field:{name:'project_mstore__done_deptname',type:'string'}},
	{col:{header:'项目数量', width:100, sortable:true, renderer:JxUtil.formatInt()}, field:{name:'project_mstore__project_num',type:'int'}},
	{col:{header:'汇总申报人', width:100, sortable:true, defaultval:'fun_getUserName()', editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:20
		})}, field:{name:'project_mstore__plan_user',type:'string'}},
	{col:{header:'申报部门id', width:100, sortable:true, hidden:true, defaultval:'fun_getOrgId()'}, field:{name:'project_mstore__dept_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'project_mstore__project_mstore_id',type:'string'}},
	{col:{header:'申报人id', width:100, sortable:true, hidden:true}, field:{name:'project_mstore__plan_userid',type:'string'}},
	{col:{header:'主管部门id', width:100, sortable:true, hidden:true}, field:{name:'project_mstore__done_deptid',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '1',
		isshow: '1',
		funid: 'project_mpull'
	};
	
	
		
	return new Jxstar.GridNode(config);
}